import java.util.Scanner;

//reverse the string 

//								Please enter the input line
//								Hi it's me
//								The input string is "Hi it's me"
//								The reversed string is "em s'ti iH"
				

public class Assignment8 {

	//reverse the string
	public static void main(String args[]) {
		Scanner s = new Scanner(System.in);
		System.out.println("Please enter the input line");
		String mystr = s.nextLine();
		System.out.format("The input string is \"%s\"", mystr);
		char inputstr[] = mystr.toCharArray(); 
		int mylength = inputstr.length;
		char reversestr[] = new char[mylength];
		int j = 0;
		for(int i=mylength-1;i>=0;i--) {
			reversestr[j] = inputstr[i]; 
			j++;
		}
		System.out.format("%nThe reversed string is \"%s\"", String.valueOf(reversestr)); 	
	}
	
}
